package ink.metoo.gude.module.mail.service.impl

import ink.metoo.gude.module.mail.service.MailService
import ink.metoo.gude.util.logger
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
import org.springframework.stereotype.Service
import java.io.File

@Service
@ConditionalOnProperty("spring.mail.host", matchIfMissing = true)
class NoneMailServiceImpl : MailService {

    val log = logger()

    override fun send(
        subject: String,
        to: Array<String>,
        cc: Array<String>,
        bcc: Array<String>,
        content: String,
        html: Boolean,
        files: Array<File>
    ): Boolean {
        log.warn("Unsupported mail subject: $subject, to: ${to.joinToString(",")}")
        return false
    }


}